﻿namespace TouchPoint.IO
{
    using System;

    /// <summary>
    /// 表示Tpml记号
    /// </summary>
    public sealed class TpmlToken
    {
        /// <summary>
        /// 表示一个Tpml记号的类型
        /// </summary>
        public enum TpmlTokenType
        {
            Start,
            Value,
            Close
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="type"></param>
        /// <param name="data"></param>
        public TpmlToken(TpmlTokenType type,string data)
        {
            Type = type;
            Data = data;
        }

        /// <summary>
        /// 获取当前Token的类型
        /// </summary>
        public readonly TpmlTokenType Type;

        /// <summary>
        /// 获取当前Token的数据
        /// </summary>
        public readonly string Data;
    }
}
